<template>
  <commonBox title="资产预警" width="800px">
    <div class="noAssest-container">
      <div
        class="no-content"
        v-if="
          assetWarning.length == 0 &&
          onesuppliesList.length == 0 &&
          zerosuppliesList.length == 0
        "
      >
        <img src="@/assets/img/woring.png" alt="" />
      </div>
      <div class="all-container" v-else>
        <div class="message-container">
          <div class="message-list">
            <div class="message-title">名下无资产</div>
          </div>
          <div class="message-list" v-for="item in assetWarning">
            <div class="message-item">
              {{ item.departmentname }}-{{ item.lastname }}
            </div>
          </div>
        </div>
        <div class="message-container" style="width: 48%">
          <div class="message-list">
            <div class="message-title">剩余0个的耗材</div>
          </div>
          <div class="message-list" v-for="item in zerosuppliesList">
            <div class="message-item">{{ item.mc }}</div>
          </div>
          <div class="message-list">
            <div class="message-title">剩余1个的耗材</div>
          </div>
          <div class="message-list" v-for="item in onesuppliesList">
            <div class="message-item">{{ item.mc }}</div>
          </div>
        </div>
      </div>
    </div>
  </commonBox>
</template>

<script setup>
import commonBox from "../commonBox.vue";
const props = defineProps({
  assetWarning: {
    type: Array,
    default: () => [],
  },
  onesuppliesList: {
    type: Array,
    default: () => [],
  },
  zerosuppliesList: {
    type: Array,
    default: () => [],
  },
});
</script>

<style scoped lang="less">
.noAssest-container {
  width: 100%;
  .no-content {
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 512px;
      height: 512px;
    }
  }
  .all-container {
    width: 100%;
    height: 676px;
    display: flex;
    justify-content: space-between;
  }
  .message-container {
    width: 50%;
    height: 676px;
    display: flex;
    flex-direction: column;
    overflow: scroll;
    .message-list {
      width: 100%;
      display: flex;
      align-items: center;
      .message-item {
        line-height: 36px;
        font-size: 20px;
        font-weight: 800;
      }
      .message-title {
        line-height: 36px;
        font-size: 22px;
        font-weight: 800;
        color: #f1481ece;
        border-bottom: 2px solid #e5e7eb;
        width: 100%;
      }
    }
  }
}
</style>
